using System;
using System.Collections.Generic;
using ns26;
using ns27;
using Triton.Game.Mono;

namespace Triton.Game.Mapping
{
	[Attribute38("ConfigFile")]
	public class ConfigFile : MonoClass
	{
		public enum LineType
		{
			UNKNOWN,
			COMMENT,
			SECTION,
			ENTRY
		}

		[Attribute38("ConfigFile.Line")]
		public class Line : MonoClass
		{
			public string m_raw => method_4("m_raw");

			public LineType m_type => method_2<LineType>("m_type");

			public string m_sectionName => method_4("m_sectionName");

			public string m_lineKey => method_4("m_lineKey");

			public string m_fullKey => method_4("m_fullKey");

			public string m_value => method_4("m_value");

			public bool m_quoteValue => method_2<bool>("m_quoteValue");

			public Line(IntPtr address, string className)
				: base(address, className)
			{
			}

			public Line(IntPtr address)
				: this(address, "Line")
			{
			}
		}

		public string m_path => method_4("m_path");

		public List<Line> m_lines => method_3<Class271<Line>>("m_lines")?.method_25();

		public ConfigFile(IntPtr address, string className)
			: base(address, className)
		{
		}

		public ConfigFile(IntPtr address)
			: this(address, "ConfigFile")
		{
		}

		public string GetPath()
		{
			return method_13("GetPath");
		}

		public bool LightLoad(string path)
		{
			return method_11<bool>("LightLoad", new object[1] { path });
		}

		public bool FullLoad(string path)
		{
			return method_11<bool>("FullLoad", new object[1] { path });
		}

		public bool Save(string path)
		{
			return method_11<bool>("Save", new object[1] { path });
		}

		public bool Has(string key)
		{
			return method_11<bool>("Has", new object[1] { key });
		}

		public bool Delete(string key, bool removeEmptySections)
		{
			return method_11<bool>("Delete", new object[2] { key, removeEmptySections });
		}

		public void Clear()
		{
			method_8("Clear");
		}

		public string Get(string key, string defaultVal)
		{
			return method_12("Get", new Class276.Enum20[2]
			{
				Class276.Enum20.String,
				Class276.Enum20.String
			}, key, defaultVal);
		}

		public bool Get(string key, bool defaultVal)
		{
			return method_10<bool>("Get", new Class276.Enum20[2]
			{
				Class276.Enum20.String,
				Class276.Enum20.Boolean
			}, new object[2] { key, defaultVal });
		}

		public int Get(string key, int defaultVal)
		{
			return method_10<int>("Get", new Class276.Enum20[2]
			{
				Class276.Enum20.String,
				Class276.Enum20.I4
			}, new object[2] { key, defaultVal });
		}

		public float Get(string key, float defaultVal)
		{
			return method_10<float>("Get", new Class276.Enum20[2]
			{
				Class276.Enum20.String,
				Class276.Enum20.R4
			}, new object[2] { key, defaultVal });
		}

		public bool Set(string key, object val)
		{
			return method_10<bool>("Set", new Class276.Enum20[2]
			{
				Class276.Enum20.String,
				Class276.Enum20.Class
			}, new object[2] { key, val });
		}

		public bool Set(string key, bool val)
		{
			return method_10<bool>("Set", new Class276.Enum20[2]
			{
				Class276.Enum20.String,
				Class276.Enum20.Boolean
			}, new object[2] { key, val });
		}

		public bool Set(string key, string val)
		{
			return method_10<bool>("Set", new Class276.Enum20[2]
			{
				Class276.Enum20.String,
				Class276.Enum20.String
			}, new object[2] { key, val });
		}

		public List<Line> GetLines()
		{
			return method_14<Class271<Line>>("GetLines", Array.Empty<object>())?.method_25();
		}

		public string GenerateText()
		{
			return method_13("GenerateText");
		}

		public bool Load(string path, bool ignoreUselessLines)
		{
			return method_11<bool>("Load", new object[2] { path, ignoreUselessLines });
		}

		public int FindSectionIndex(string sectionName)
		{
			return method_11<int>("FindSectionIndex", new object[1] { sectionName });
		}

		public Line FindEntry(string fullKey)
		{
			return method_14<Line>("FindEntry", new object[1] { fullKey });
		}

		public int FindEntryIndex(string fullKey)
		{
			return method_11<int>("FindEntryIndex", new object[1] { fullKey });
		}

		public Line RegisterEntry(string fullKey)
		{
			return method_14<Line>("RegisterEntry", new object[1] { fullKey });
		}
	}
}
